package com.ihr360.payroll.config;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ihr360.commons.model.type.FormulaFrom;
import com.ihr360.commons.model.type.RoundingMode;
import com.ihr360.commons.model.type.SalaryFieldValueType;

import java.io.Serializable;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AbstractSalaryFieldValueEntity implements Serializable {

    /** 薪酬字段值类型 */
    protected SalaryFieldValueType valueType = SalaryFieldValueType.NUMBER;

    /** 是否可空 */
    protected boolean nullable = true;

    /** 最小值 */
    protected long minValue = Long.MIN_VALUE;

    /** 最大值 */
    protected long maxValue = Long.MAX_VALUE;

    /** 舍入规则 */
    protected RoundingMode roundingMode = RoundingMode.ROUND;

    protected int pattern = 0;

    /**
     * Raw公式定义
     */
    protected String formula;

    protected FormulaFrom formulaFrom;

    protected String formulaMeta;

    public SalaryFieldValueType getValueType() {
        return valueType;
    }

    public void setValueType(SalaryFieldValueType valueType) {
        this.valueType = valueType;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public long getMinValue() {
        return minValue;
    }

    public void setMinValue(long minValue) {
        this.minValue = minValue;
    }

    public long getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(long maxValue) {
        this.maxValue = maxValue;
    }

    public RoundingMode getRoundingMode() {
        return roundingMode;
    }

    public void setRoundingMode(RoundingMode roundingMode) {
        this.roundingMode = roundingMode;
    }

    public int getPattern() {
        return pattern;
    }

    public void setPattern(int pattern) {
        this.pattern = pattern;
    }

    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public FormulaFrom getFormulaFrom() {
        return formulaFrom;
    }

    public void setFormulaFrom(FormulaFrom formulaFrom) {
        this.formulaFrom = formulaFrom;
    }

    public String getFormulaMeta() {
        return formulaMeta;
    }

    public void setFormulaMeta(String formulaMeta) {
        this.formulaMeta = formulaMeta;
    }
}